Skip to content

fix(fast-element): clear event context after thrown handlers#7547

Draft
janechu wants to merge 1 commit into
releases/fast-element-v3from
users/janechu/event-context-cleanup
Draft

fix(fast-element): clear event context after thrown handlers#7547
janechu wants to merge 1 commit into
releases/fast-element-v3from
users/janechu/event-context-cleanup

Conversation

@janechu
Copy link
Copy Markdown
Collaborator

@janechu janechu commented May 29, 2026

Pull Request

📖 Description

  • Clears the FAST Element event execution context in a finally path when event handler evaluation throws.
  • Preserves existing preventDefault() behavior for completed handlers that do not return true.
  • Adds targeted Playwright coverage and updates event binding documentation/design notes.

📑 Test Plan

  • npx playwright test --project=chromium -g "clears the current event"
  • npm run build -w @microsoft/fast-element
  • npx biome check packages\fast-element\src\templating\html-binding-directive.ts packages\fast-element\src\templating\html-binding-directive.pw.spec.ts packages\fast-element\DESIGN.md packages\fast-element\docs\template-bindings.md packages\fast-element\SIZES.md change\@microsoft-fast-element-809c6e19-e1e8-49f4-ad14-bdd77f4d76dd.json
  • npm run checkchange

✅ Checklist

General

  • I have included a change request file using $ npm run change
  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant